﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace NCacheDClient.Configuration
{
    public class NCacheDServersCollection : ConfigurationElementCollection
    {
        public NCacheDServersCollection()
        {

        }

        public override ConfigurationElementCollectionType CollectionType
        {
            get
            {
                return ConfigurationElementCollectionType.AddRemoveClearMap;
            }
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new NCacheDServerElement();
        }

        protected override Object GetElementKey(ConfigurationElement element)
        {
            return ((NCacheDServerElement)element).Host + ((NCacheDServerElement)element).Port;
        }
    }
}
